package com.example.demo.service.impl;

import com.example.demo.entity.Usd;
import com.example.demo.mapper.UsdMapper;
import com.example.demo.service.UsdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UsdServiceImpl implements UsdService {
    @Autowired
    private UsdMapper usdMapper;

    @Override
    public Boolean add(Usd usd) {
        int ii = usdMapper.add(usd);
        if (ii > 0) return true;
        return false;
    }

    @Override
    public Boolean delete(Long id) {
        int dd = usdMapper.delete(id);
        if (dd > 0) return true;
        return false;
    }

    @Override
    public Boolean update(Usd usd) {
        int uu = usdMapper.update(usd);
        if (uu > 0) return true;
        return false;
    }
}
